翻訳と辞書
Words near each other
・ Sequence dating
・ Sequence determination
・ Sequence diagram
・ Sequence feature variant type
・ Sequence Hills
・ Sequence hypothesis
・ Sequence labeling
・ Sequence learning
・ Sequence logo
・ Sequence motif
・ Sequence of events recorder
・ Sequence of Saint Eulalia
・ Sequence of tenses
・ Sequence Ontology
・ Sequence Organizers
Sequence point
・ Sequence profiling tool
・ Sequence Read Archive
・ Sequence space
・ Sequence space (evolution)
・ Sequence step algorithm
・ Sequence stratigraphy
・ Sequence transformation
・ Sequence-controlled polymer
・ Sequence-dependent setup
・ Sequence-related amplified polymorphism
・ Sequence-tagged site
・ SequenceBase
・ Sequenced Packet Exchange
・ SequenceL


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Sequence point : ウィキペディア英語版
Sequence point
A sequence point defines any point in a computer program's execution at which it is guaranteed that all side effects of previous evaluations will have been performed, and no side effects from subsequent evaluations have yet been performed. A sequence point is a point in program execution at which all side effects are evaluated before going on to the next step. They are often mentioned in reference to C and C++, because they are a core concept for determining the validity and, if valid, the possible results of expressions. Adding more sequence points is sometimes necessary to make an expression defined and to ensure a single valid order of evaluation.
With C++11, usage of the term sequence point has been replaced by sequencing. There are three possibilities:〔(【引用サイトリンク】url=http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=50372 )〕〔(【引用サイトリンク】url=http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2239.html )〕〔(【引用サイトリンク】url=http://en.cppreference.com/w/c/language/eval_order )
#An expression's evaluation can be sequenced before that of another expression, or equivalently the other expression's evaluation is sequenced after that of the first.
#The expressions' evaluation is indeterminately sequenced, meaning one is sequenced before the other, but which is unspecified.
#The expressions' evaluation is unsequenced.
The execution of unsequenced evaluations can overlap, with catastrophic undefined behavior if a write to an object is unsequenced with regard to another access to the same.
==Examples of ambiguity==
Consider two functions f() and g(). In C and C++, the + operator is not associated with a sequence point, and therefore in the expression f()+g() it is possible that either f() or g() will be executed first. The comma operator introduces a sequence point, and therefore in the code f(),g() the order of evaluation is defined: first f() is called, and then g() is called.
Sequence points also come into play when the same variable is modified more than once within a single expression. An often-cited example is the C expression i=i++, which apparently both assigns i its previous value and increments i. The final value of i is ambiguous, because, depending on the order of expression evaluation, the increment may occur before, after, or interleaved with the assignment. The definition of a particular language might specify one of the possible behaviors or simply say the behavior is undefined. In C and C++, evaluating such an expression yields undefined behavior.〔Clause 6.5#2 of the C99 specification: "''Between the previous and next sequence point an object shall have its stored value modified at most once by the evaluation of an expression. Furthermore, the prior value shall be accessed only to determine the value to be stored.''"〕

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Sequence point」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.